package com.solareast.service.app.visitor;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.solareast.dao.DaoSupport;
import com.solareast.entity.Page;
import com.solareast.util.PageData;


@Service("VisitorService")
public class VisitorService {

	@Resource(name = "daoSupport")
	private DaoSupport dao;
	
	/*
	* 新增
	*/
	public void save(PageData pd)throws Exception{
		dao.save("VisitorMapper.save", pd);
	}
	
	/*
	*列表
	*/
	public List<PageData> list(PageData pd)throws Exception{
		return (List<PageData>)dao.findForList("VisitorMapper.list", pd);
	}



	public PageData listCount(PageData pd) throws Exception{
		return (PageData) dao.findForObject("VisitorMapper.listCount",pd);
	}

	/*
	* 通过id获取数据
	*/
	public PageData findById(PageData pd)throws Exception{
		return (PageData)dao.findForObject("VisitorMapper.findById", pd);
	}
	public void insert(PageData pd) throws Exception{
		dao.update("VisitorMapper.insert", pd);
	}

}

